<!--{template admin/header}-->
{if !$admin_check_allow}
<h3>为安全起见，您没有编辑 <font color="#D94446">{$member_info['nickname']}</font> 用户信息的权限，请使用<b>网站创始人</b>的身份登录后再进行编辑操作。</h3>
<div>关于“<b>网站创始人</b>”，请参阅readme.txt文件中的第三条说明，<a title="点此在新窗口中打开查看关于“网站创始人”的说明及设置方法" href="{conf site_url}/readme.txt" target="_blank">点击查看&gt;&gt;</a></div>
{/if}
<form method="post" action="{$action}">
    <INPUT TYPE="hidden" name='uid' value={$this->ID}>
    <INPUT TYPE="hidden" name='old_username' value={$username}>
    <a name="{$this->Title} - {$username}"></a>
    <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
        <tr class="header">
            <td colspan="2">{$this->Title} - {$nickname}</td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>帐户昵称:</b><br>
                <span class="smalltxt">如不是特别需要，请不要修改</span></td>
            <td bgcolor="#FFFFFF"><strong>
                    <input name="nickname" type="text" id="nickname" value="{$nickname}" size="30" />{$member['validate_html']}
                </strong></td>
        </tr>
        <!--#if NEDU#-->
        <!--{if defined('NEDU_MOYO')}-->
        <!--{echo nui('jsg')->hook('admin.member.info.dsp');}-->
        <!--{/if}-->
        <!--#endif#-->
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>登录密码:</b><br>
                <span class="smalltxt">如果不更改密码此处请留空</span></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="password">      </td>
        </tr>
        <!--{if $this->Config[company_enable]}-->
        <tr>
            <td width="110" align="right" valign="top"><b>所属{$d_c_name}:</b></td>
            <td><input type="hidden" name="companyid" id="companyid" value="{$member_info[companyid]}">{$companyselect}</td>
        </tr>
        <!--{if $this->Config[department_enable]}-->
        <tr>
            <td width="110" align="right" valign="top"><b>所在{$d_d_name}:</b></td>
            <td><input type="hidden" name="departmentid" id="departmentid" value="{$member_info[departmentid]}"><div id="departmentselect">{$departmentselect}</div></td>
        </tr>
        <!--{/if}-->
        <tr>
            <td width="110" align="right" valign="top"><b>任职{$d_j_name}:</b></td>
            <td><input type="hidden" name="jobid" id="jobid" value="{$member_info[jobid]}">{$jobselect}</td>
        </tr>
        <!--{if $morcompanys}-->
        <tr><td width="110" align="right" valign="top"><b>其它任职：</b></td><td>
                <!--{loop $morcompanys $c_v}-->
        <li style="margin:5px 0px;">{$c_v[company]}&nbsp;&nbsp;{$c_v[department]}&nbsp;&nbsp;{$c_v[job]}<span style="margin-left:20px;"><a href="admin.php?mod=member&code=cpuser&do=mod&id={$c_v[id]}&uid={$member_info[uid]}">修改</a>&nbsp;&nbsp;<a href="admin.php?mod=member&code=cpuser&do=del&id={$c_v[id]}&uid={$member_info[uid]}">删除</a>&nbsp;&nbsp;<a href="admin.php?mod=member&code=cpuser&do=set&id={$c_v[id]}&uid={$member_info[uid]}">设为默认</a></span></li>
        <!--{/loop}-->
        </td></tr>
        <!--{/if}-->
        <!--{if $member_info[companyid]}-->
        <tr>
            <td width="40%">&nbsp;</td><td><a href="admin.php?mod=member&code=cpuser&do=add&uid={$member_info[uid]}">增加其它任职</a></td>
        </tr>
        <!--{/if}-->
        <!--{/if}-->
        <!--{if !((true === UCENTER_FACE && true === UCENTER) || (true === UCENTER_FACE && true === PWUCENTER))}-->
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>用户头像:</b>
            <td bgcolor="#FFFFFF"><a href="admin.php?mod=member&code=editface&uid={$uid}"><img src="{$member_face}" width="50px" height="50px" title="点击修改" onerror="javascript:faceError(this);" />点此修改头像</a></td>
        </tr>
        <!--{/if}-->
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>封面:</b>
            <td bgcolor="#FFFFFF"><a href="admin.php?mod=member&code=profile_image&uid={$uid}"><img src="{$profile_image}" width="100px" height="50px" title="点击修改" onerror="javascript:this.src='./images/art_bg.jpg'" />点此修改封面</a></td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>用户所在地:</b></td>
            <td bgcolor="#FFFFFF"><div style="float:left;">{$province_list}</div>
                <div style="float:left;"><select id="city" name="city" onchange="changeCity();">
                        <option value="0">请选择</option>
                    </select></div>
                <div style="float:left;"><select id="area" name="area" onchange="changeArea();" style="display:none">
                        <option value="0">请选择</option>
                    </select></div>
                <div style="float:left;"><select id="street" name="street" style="display:none">
                        <option value="0">请选择</option>
                    </select></div>
                <input type="hidden" id="hid_city" name="hid_city" value="$hid_city">
                <input type="hidden" id="hid_area" name="hid_area" value="$hid_area">
                <input type="hidden" id="hid_street" name="hid_street" value="$hid_street">
            </td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>用户角色:</b><br>
                <span class="smalltxt"></span></td>
            <td bgcolor="#FFFFFF">
                
                <!--{if (true===JISHIGOU_FOUNDER || true === $admin_check_allow) && (true===JISHIGOU_FOUNDER || $member_info['uid'] != 1)}-->
                {$role_select}
                <!--{else}-->
                {$role_name}
                <!--{/if}-->
            </td>
        </tr>

        <tr id="causetext" style="display:none; width:100%;" >
            <td width="40%" bgcolor="#F8F8F8"><b>封杀理由:</b><br>
                <span class="smalltxt">将用户放入禁言组或封杀组时的理由</span></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="cause" value="{$cause}"></td>
        </tr>
        <script type="text/javascript">
            function showcause() {
                var role_id = document.getElementById('role_id').value;
                if (role_id == '4' || role_id == '118') {
                    document.getElementById('causetext').style.display = 'block';
                } else {
                    document.getElementById('causetext').style.display = 'none';
                }
            }
            showcause();
        </script>


        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>性别:</b></td>
            <td bgcolor="#FFFFFF"> {$gender_radio}</td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>Email:</b></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="email" value="{$email}">
                <label class="label"><input type="checkbox" name="email_checked" value="1" {eval if($email_checked) echo 'checked'}>通过验证</label>
            </td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>注册IP</b></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="regip" value="{$regip}">	  </td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>最后活动IP</b></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="lastip" value="{$lastip}">	  </td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>个性域名:</b><br>
                <span class="smalltxt">如不是特别需要，请不要修改</span></td>
            <td bgcolor="#FFFFFF">
                <input type="text" size="30" name="username" value="{$username}">
            </td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>手机号码:</b><br>
                <span class="smalltxt"></span></td>
            <td bgcolor="#FFFFFF">
                <input type="text" size="30" name="phone" value="{$phone}">
            </td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>关于{$nickname}:</b><br>
                <span class="smalltxt">该信息显示在用户微博页面右侧</span>
            </td>
            <td bgcolor="#FFFFFF"><textarea name="aboutme" cols="30" rows="3" id="aboutme">{$aboutme}</textarea></td>
        </tr>
    </table>
    <center>
        <input type="submit" class="button" name="editsubmit" value="提 交">
    </center>
    <br>
    <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
        <tr class="header">
            <td colspan="2">真实信息（证件号码不会对外显示，仅供管理员核对用户身份用）</td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>真实姓名:</b></td>
            <td bgcolor="#FFFFFF"><input type="text" name="validate_true_name" value="{$member_info[validate_true_name]}" size="30" /></td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>证件类型:</b></td>
            <td bgcolor="#FFFFFF">{$validate_card_type_select}</td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>证件号码:</b></td>
            <td bgcolor="#FFFFFF"><input type="text" name="validate_card_id" value="{$member_info[validate_card_id]}" size="30" /></td>
        </tr>
        <!--<tr>
      <td width="40%" bgcolor="#F8F8F8"><b>是否V认证:</b><br>
          <span class="smalltxt">选择是，用户头像右侧会显示一个认证图标</span></td>
      <td bgcolor="#FFFFFF">{$validate_radio}</td>
    </tr>-->
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>V认证备注:</b><br>
                <span class="smalltxt">鼠标在认证图标悬浮时，会看到右侧填写的信息</span></td>
            <td bgcolor="#FFFFFF"><input type="text" name="validate_remark" value="{$member_info[validate_remark]}" size="30" /></td>
        </tr>
    </table>
    <center>
        <input type="submit" class="button" name="editsubmit" value="提 交">
    </center>
    <br>
    <!--{if $this->Config[extcredits_enable]}-->
    <a name="用户积分"></a>
    <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
        <tr class="header">
            <td colspan="2">用户积分</td>
        </tr>
        <!--{loop $this->Config[credits][ext] $_k $_v}-->
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>{$_v[name]}:</b></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="{$_k}" value={$member_info[$_k]}>
            </td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>备注:</b></td>
            <td bgcolor="#FFFFFF"><input type="text" size="200" name="{$_k}_remark"></td>
        </tr>
        <!--{/loop}-->
    </table>
    <center>
        <input type="submit" class="button" name="editsubmit" value="提 交">
    </center>
    <br>
    <!--{/if}-->
</form>
<!--{loop $groupProfile $k $v}-->
<form method="post" action="admin.php?mod=member&code=domodify&op=$k"><INPUT TYPE="hidden" name='uid' value={$this->ID}>
    <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
        <tr class="header">
            <td colspan="2">$v['title']</td>
        </tr>
        <!--{loop $v['list'] $key $val}-->
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>$val['title']：</b></td>
            <td>
                <!--{if $val['formtype'] == 'text'}-->
                <input type="text" name="{$key}" class="p1" value="$member[$key]">
                <!--{elseif $val['formtype'] == 'select'}-->
                <!--{if $val['choices']}-->
                <select name="{$key}" class="select">
                    <!--{eval $choices = explode("\r\n",$val['choices']) ; print_r($choices);}-->
                    <!--{loop $choices $s_k $s_v}-->
                    <!--{eval list($v1,$v2)=explode("|",$s_v);$v2 || $v2=$v1;$select='';if($v1 == $member[$key]) $select="selected"}-->
                    <option value="{$v1}" $select>{$v2}</option>
                    <!--{/loop}-->
                </select>
                <!--{elseif ('birthcity' == $key)}-->
                <span>$member['birthcity']</span>
                <!--{/if}-->
                <!--{elseif $val['formtype'] == 'textarea'}-->
                <textarea name="{$key}">$member[$key]</textarea>
                <!--{elseif $val['formtype'] == 'date'}-->
                <script src="./static/js/date/WdatePicker.js" type="text/javascript"></script>
                <input class="p1" type="text" name="$key" value="{$member[$key]}" readonly onFocus="WdatePicker({startDate: '%y-%M-%d', dateFmt: 'yyyy-MM-dd', alwaysUseStartDate: true})"/>
                <!--{else}-->
                <!--{/if}-->
            </td>
        </tr>
        <!--{/loop}-->
    </table>
    <center>
        <input type="submit" class="button" name="editsubmit" value="提 交">
    </center>
</form>
<form method="post" action="admin.php?mod=member&code=domodifyintroduce" enctype="multipart/form-data">
    <INPUT TYPE="hidden" name='uid' value={$this->ID}>
    <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
        <tr class="header">
            <td colspan="2">个人详情</td>
        </tr>
        <!--{if $introduce != ''}-->
        <!--{loop $introduce $key $val}-->
        <!--{if $key != 0}-->
        <tr class="header module-{$key}"><td colspan="2"></td></tr>
        <!--{/if}-->
        <tr class="module-{$key}">
            <td width="40%" bgcolor="#F8F8F8"><b>模块名称:</b><span class="button delete_module" data-module="module-{$key}">删除当前模块</span></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="module[]" value="{$val['module']}">
            </td>
        </tr>
        <tr class="module-{$key}">
            <td width="40%" bgcolor="#F8F8F8"><b>模块类型:</b></td>
            <td bgcolor="#FFFFFF">
                <select name="module_type[]">
                    <option value="">请选择</option>
                    <option value="text" <!--{if isset($val['module_type']) && $val['module_type'] == 'text'}--> selected="selected"<!--{/if}-->>文本</option>
                    <option value="mixde"<!--{if isset($val['module_type']) && $val['module_type'] == 'mixde'}--> selected="selected"<!--{/if}-->>图文</option>
                </select>
            </td>
        </tr>
        <!--{loop $val['con'] $k $v}-->
        <tr class="module-{$key} module-{$key}-{$k}">
            <td width="40%" bgcolor="#F8F8F8" colspan="2"><b>模块内容:</b><span class="button delete_module_content" data-module="module-{$key}-{$k}">删除当前模块内容</span></td>
        </tr>
        <tr class="module-{$key} module-{$key}-{$k}">
            <td width="40%" bgcolor="#F8F8F8"><b>标题:</b></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="title{$key}[]" value="{$v['title']}"></td>
        </tr> 
        <tr class="module-{$key} module-{$key}-{$k}">
            <td width="40%" bgcolor="#F8F8F8"><b>内容:</b></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="content{$key}[]" value="{$v['content']}"></td>
        </tr> 
        <tr class="module-{$key} module-{$key}-{$k}">
            <td width="40%" bgcolor="#F8F8F8"><b>年份:</b></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="year{$key}[]" value="{$v['year']}"></td>
        </tr>
        <tr class="module-{$key} module-{$key}-{$k}">
            <td width="40%" bgcolor="#F8F8F8"><b>图片:</b></td>
            
            <td bgcolor="#FFFFFF">
                <!--{if $v['image_src']}--><img src="{$v['image_src']}" width="181" height="267"><br><!--{/if}-->
                <input type="file" name="image{$key}[]" >（大小：181*267）
                <input type="hidden" name="image_src{$key}[]" value="{$v['image_src']}">
            </td>
        </tr>
        <!--{/loop}-->
        <tr class="module-{$key}">
            <td width="40%" bgcolor="#F8F8F8" colspan="2"><span class="button add_module_content" data-mid="{$key}" data-cid="<!--{echo count($val['con'])}-->">添加新模块内容</span></td>
        </tr>
        <!--{/loop}-->
        <tr>
            <td width="40%" bgcolor="#F8F8F8" colspan="2"><span class="button add_module" data-mid="<!--{echo count($introduce)-1}-->">添加新模块</span></td>
        </tr>
        <!--{else}-->
        <tr class="module-0">
            <td width="40%" bgcolor="#F8F8F8"><b>模块名称:</b></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="module[]" value="">
            </td>
        </tr>
        <tr class="module-0"><td width="40%" bgcolor="#F8F8F8"><b>模块类型:</b></td><td bgcolor="#FFFFFF"><select name="module_type[]"><option value="0">请选择</option><option value="text">文本</option><option value="mixde">图文</option></select></td></tr>
        
        <tr class="module-0 module-0-0">
            <td width="40%" bgcolor="#F8F8F8" colspan="2"><b>模块内容:</b></td>
        </tr>
        <tr class="module-0 module-0-0">
            <td width="40%" bgcolor="#F8F8F8"><b>标题:</b></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="title0[]"></td>
        </tr> 
        <tr class="module-0 module-0-0">
            <td width="40%" bgcolor="#F8F8F8"><b>内容:</b></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="content0[]"></td>
        </tr> 
        <tr class="module-0 module-0-0">
            <td width="40%" bgcolor="#F8F8F8"><b>年份:</b></td>
            <td bgcolor="#FFFFFF"><input type="text" size="30" name="year0[]"></td>
        </tr>
        <tr class="module-0 module-0-0">
            <td width="40%" bgcolor="#F8F8F8"><b>图片:</b></td>
            <td bgcolor="#FFFFFF">
                <input type="file" name="image0[]" >（大小：181*267）
                <input type="hidden" name="image_src0[]">
            </td>
        </tr>
        <tr class="module-0">
            <td width="40%" bgcolor="#F8F8F8" colspan="2"><span class="button add_module_content" data-mid="0" data-cid="0">添加新模块内容</span></td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8" colspan="2"><span class="button add_module" data-mid="0">添加新模块</span></td>
        </tr>
        <!--{/if}-->
        
    </table>
    <center>
        <input type="submit" class="button" name="editsubmit" value="提 交">
    </center>
</form>
<!--{/loop}-->
<style type="text/css">
    .ke-iframe{width:100%;}
</style>
<script type="text/javascript" charset="utf-8" src="static/js/kind/kindeditor.js"></script>
<script type="text/javascript">
KE.show({
id : 'details',
resizeMode : 1
});
</script>
<form method="post" action="admin.php?mod=member&code=domodifydetails" enctype="multipart/form-data">
    <INPUT TYPE="hidden" name='uid' value={$this->ID}>
    <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
        <tr class="header">
            <td colspan="2">资料详情</td>
        </tr>
        <tr>
            <td width="40%" bgcolor="#F8F8F8"><b>内容</b></td>
            <td>
                <textarea name="details" style="width:100%; height:640px;" id="content">{$member[details]}</textarea>
            </td>
        </tr>
    </table>
    <center>
        <input type="submit" class="button" name="editsubmit" value="提 交">
    </center>
</form>
<br>
<script type="text/javascript">
    $(function(){
        $(".add_module").click(function(){
            var mid = $(this).attr("data-mid");
            var num = parseInt(mid) + 1;
            $(this).attr("data-mid",num);
            add_module(num);
            return false;
        });
        $(".add_module_content").live('click',function(){
            var mid = $(this).attr("data-mid");
            var cid = $(this).attr("data-cid");
            $(this).attr("data-cid",parseInt(cid)+1);
            add_module_content($(this),mid,cid);
            return false;
        });
        $(".delete_module_content").live('click',function(){
            var module = $(this).attr("data-module");
            $("."+module).remove();
            return false;
        });
        $(".delete_module").live('click',function(){
            var module = $(this).attr("data-module");
            $("."+module).remove();
            return false;
        });
    })
    function add_module(num){
        var module_html = '';
        module_html += '<tr class="header module-'+num+'"><td colspan="2"></td></tr>';
        module_html += '<tr class="module-'+num+'"><td width="40%" bgcolor="#F8F8F8"><b>模块名称:</b><span class="button delete_module" data-module="module-'+num+'">删除当前模块</span></td><td bgcolor="#FFFFFF"><input type="text" size="30" name="module[]" value=""></td></tr>';
        module_html += '<tr class="module-'+num+'"><td width="40%" bgcolor="#F8F8F8"><b>模块类型:</b></td><td bgcolor="#FFFFFF"><select name="module_type[]"><option value="0">请选择</option><option value="text">文本</option><option value="mixde">图文</option></select></td></tr>';
        module_html += '<tr class="module-'+num+' module-'+num+'-0""><td width="40%" bgcolor="#F8F8F8" colspan="2"><b>模块内容:</b></td></tr>';
        module_html += '<tr class="module-'+num+' module-'+num+'-0""><td width="40%" bgcolor="#F8F8F8"><b>标题:</b></td><td bgcolor="#FFFFFF"><input type="text" size="30" name="title'+num+'[]"></td></tr>';
        module_html += '<tr class="module-'+num+' module-'+num+'-0""><td width="40%" bgcolor="#F8F8F8"><b>内容:</b></td><td bgcolor="#FFFFFF"><input type="text" size="30" name="content'+num+'[]"></td></tr> ';
        module_html += '<tr class="module-'+num+' module-'+num+'-0""><td width="40%" bgcolor="#F8F8F8"><b>年份:</b></td><td bgcolor="#FFFFFF"><input type="text" size="30" name="year'+num+'[]"></td></tr>';
        module_html += '<tr class="module-'+num+' module-'+num+'-0""><td width="40%" bgcolor="#F8F8F8"><b>图片:</b></td><td bgcolor="#FFFFFF"><input type="file" name="image'+num+'[]" >（大小：181*267）<input type="hidden" name="image_src'+num+'[]"></td></tr>';
        module_html += '<tr class="module-'+num+'"><td width="40%" bgcolor="#F8F8F8" colspan="2"><span class="button add_module_content" data-mid="'+num+'" data-cid="0" data-id="0">添加新模块内容</span></td></tr>';
        $(".add_module").parent().parent().before(module_html);
    }
    function add_module_content(el,num,cid){
        var module_content_html = '';
        module_content_html += '<tr class="module-'+num+' module-'+num+'-'+cid+'"><td width="40%" bgcolor="#F8F8F8" colspan="2"><b>模块内容:</b><span class="button delete_module_content" data-module="module-'+num+'-'+cid+'">删除当前模块内容</span></td></tr>';
        module_content_html += '<tr class="module-'+num+' module-'+num+'-'+cid+'"><td width="40%" bgcolor="#F8F8F8"><b>标题:</b></td><td bgcolor="#FFFFFF"><input type="text" size="30" name="title'+num+'[]"></td></tr>';
        module_content_html += '<tr class="module-'+num+' module-'+num+'-'+cid+'"><td width="40%" bgcolor="#F8F8F8"><b>内容:</b></td><td bgcolor="#FFFFFF"><input type="text" size="30" name="content'+num+'[]"></td></tr> ';
        module_content_html += '<tr class="module-'+num+' module-'+num+'-'+cid+'"><td width="40%" bgcolor="#F8F8F8"><b>年份:</b></td><td bgcolor="#FFFFFF"><input type="text" size="30" name="year'+num+'[]"></td></tr>';
        module_content_html += '<tr class="module-'+num+' module-'+num+'-'+cid+'"><td width="40%" bgcolor="#F8F8F8"><b>图片:</b></td><td bgcolor="#FFFFFF"><input type="file" name="image'+num+'[]" >（大小：181*267）<input type="hidden" name="image_src'+num+'[]"></td></tr>';
        el.parent().parent().before(module_content_html);
    }
    function changeProvince() {
        var province = document.getElementById("province").value;
        var hid_city = document.getElementById("hid_city").value;
        var url = "ajax.php?mod=member&code=sel&type=top&province=" + province + "&hid_city=" + hid_city;
        var myAjax = $.post(
                url,
                {
                    FORMHASH: $('input[name="FORMHASH"]').val(),
                    in_ajax: 1
                },
        function(d) {
            $('#' + "city").html(d);
            document.getElementById('area').length = 1;
            document.getElementById('street').length = 1;
            changeCity();
        }
        );
    }
    changeProvince();
    function changeCity() {
        var province = document.getElementById("province").value;
        var city = document.getElementById("city").value;
        document.getElementById("area").style.display = '';
        var hid_area = document.getElementById("hid_area").value;

        if (city) {
            var url = "ajax.php?mod=member&code=sel&type=top&city=" + city + "&hid_area=" + hid_area;
            var myAjax = $.post(
                    url,
                    {
                        FORMHASH: $('input[name="FORMHASH"]').val(),
                        in_ajax: 1
                    },
            function(d) {
                if (d) {
                    document.getElementById("area").style.display = "block";
                    $('#' + "area").html(d);
                    changeArea();
                } else {
                    document.getElementById("street").style.display = "none";
                    document.getElementById("area").style.display = "none";

                    document.getElementById("hid_city").value = '';
                    document.getElementById("hid_area").value = '';
                    document.getElementById("hid_street").value = '';
                }
            }
            );
        } else {
            document.getElementById("street").style.display = "none";
            document.getElementById("area").style.display = "none";

            document.getElementById("hid_city").value = '';
            document.getElementById("hid_area").value = '';
            document.getElementById("hid_street").value = '';
        }
    }
    function changeArea() {
        var area = document.getElementById("area").value;
        var hid_street = document.getElementById("hid_street").value;
        if (area) {
            var url = "ajax.php?mod=member&code=sel&type=top&area=" + area + "&hid_street=" + hid_street;
            var myAjax = $.post(
                    url,
                    {
                        FORMHASH: $('input[name="FORMHASH"]').val(),
                        in_ajax: 1
                    },
            function(d) {
                if (d) {
                    document.getElementById("street").style.display = "block";
                    $('#' + "street").html(d);
                } else {
                    document.getElementById("street").style.display = "none";
                }
            }
            );
        } else {
            document.getElementById("street").style.display = "none";
        }
        document.getElementById("hid_city").value = '';
        document.getElementById("hid_area").value = '';
        document.getElementById("hid_street").value = '';
    }
</script>
